class BasicCalcution {
    public constructor(protected value:number = 0){

    }
    public currentValue():number{
        return this.value
    }
    // 此处返回的是 this 实例
    public add(operand:number):this{
         this.value += operand
        return this
    }
    public multiply(operand:number):this{
        this.value*=operand
        return this
    }
}
// 方法执行后返回的当前实例 可以链式调用
let v = new BasicCalcution(1)
        .add(2)
        .multiply(3)
        .currentValue()


